/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.tom.social.dal.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Tom
 */
@Embeddable
public class AnalysisTermResultPK implements Serializable {
	@Basic(optional = false)
	@Column(name = "analysis_id")
	private int analysisId;
	@Basic(optional = false)
	@Column(name = "termResult_id")
	private int termResultid;

	public AnalysisTermResultPK() {
	}

	public AnalysisTermResultPK(int analysisId, int termResultid) {
		this.analysisId = analysisId;
		this.termResultid = termResultid;
	}

	public int getAnalysisId() {
		return analysisId;
	}

	public void setAnalysisId(int analysisId) {
		this.analysisId = analysisId;
	}

	public int getTermResultid() {
		return termResultid;
	}

	public void setTermResultid(int termResultid) {
		this.termResultid = termResultid;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (int) analysisId;
		hash += (int) termResultid;
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		if(!(object instanceof AnalysisTermResultPK)) {
			return false;
		}
		AnalysisTermResultPK other = (AnalysisTermResultPK) object;
		if(this.analysisId != other.analysisId) {
			return false;
		}
		if(this.termResultid != other.termResultid) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "pl.tom.social.dal.entity.AnalysisTermResultPK[analysisId=" + analysisId + ", termResultid=" + termResultid + "]";
	}

}
